switch(w1)
   {
      case 0:// verificando se 
      { 
         if ( flagCell[i+1][j][k] == AIR)
         { 
            neighbor_face[w2]+=1; a[0]++;
            return (grid_temp[w2] + gridUVW.gridU(x,y,z))/neighbor_face[w2];
         }
         break;
      }
      case 1:
      { 
         //if ( grid[GI(i,j+1,k)].value  >= 0)
         if(flagCell[i][j+1][k] == AIR)               
         { 
            neighbor_face[w2]+=1;a[1]++;
            return (grid_temp[w2] + gridUVW.gridV(x,y,z))/neighbor_face[w2];            
         }        
         break;
      }
      case 2:
      { 
         //if ( grid[GI(i,j,k+1)].value  >= 0)
         if(flagCell[i][j][k+1] == AIR)                              
         { 
            neighbor_face[w2]+=1;a[2]++;
            return (grid_temp[w2] + gridUVW.gridW(x,y,z))/neighbor_face[w2];            
         }
      break;
      }
     case 3:
      { 
         //if ( grid[GI(i,j,k)].value  <  0)
         if(flagCell[i][j][k] == FLUID)
         { 
            neighbor_face[w2]=1;            
            grid_temp[w2] = gridUVW.gridU(x,y,z);
         }
         break;
      }
      
     case 4:
      { 
         //if ( grid[GI(i,j,k)].value  <  0)
         if(flagCell[i][j][k] == FLUID)
         { 
            neighbor_face[w2]=1;
            
            grid_temp[w2] = gridUVW.gridV(x,y,z);
         }
         break;
      }
     case 5:
      { 
         //if ( grid[GI(i,j,k)].value  <  0)
         if(flagCell[i][j][k] == FLUID)
         { 
            neighbor_face[w2]=1;
            
            grid_temp[w2] = gridUVW.gridW(x,y,z);
         }
         break;
      }
      default:
         return 0;
   }
   return 0;